import instance from "@/http";


// 认证接口
export  const login =(formData)=>instance.post('/user/login',formData)

// 获取个人信息
export const getPersonalInfo = ()=>instance.get("/user/personalInfo")

// 个人密码修改
export  const  updatePersonalPwd = (formData)=>instance.put("/user/editPersonalPwd",formData)

// 退出登录
export const  logout = ()=>instance.get("/user/logout")

// 个人信息编辑
export  const  updatePersonalInfo = (formData)=>instance.put("/user/editPersonalInfo",formData)

// 用户分页     /api/user/page
export  const userPage =(formData)=>instance.post('/user/page',formData)


// 添加用户信息
export const addUser = (formData)=>instance.post("/user/add",formData)

//编辑用户信息
export const editUser = (formData)=>instance.put("/user/edit",formData)

// 重置密码
export  const  resetPwd = (uid)=>instance.put("/user/resetPwd/"+uid)

// 修改用户状态
export  const  changeUserState= (uid,state)=>instance.put("/user/changeUserState",{uid,state})

// 用户批量删除
export  const deleteUsers = (ids)=>instance.delete("/user/delete/"+ids)

// 获取用户菜单权限
export const userMenu = ()=>instance.get("/user/menu")

